package com.kqb.common.curd.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.kqb.common.curd.IBaseMapper;
import com.kqb.common.curd.IBaseService;
import org.springframework.beans.factory.annotation.Autowired;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

/**
 * @author 杉果树皮
 * @date 2025/2/14 18:57
 * @description: 基础业务层实现类
 */

public class BaseServiceImpl<T, M extends IBaseMapper> implements IBaseService<T> {

    @Autowired
    protected M iBaseMapper;

    @Override
    public int save(T entity) {

        return iBaseMapper.save(entity);
    }

    @Override
    public int update(T entity) {
        return iBaseMapper.update(entity);
    }

    @Override
    public int delete(Serializable id) {
        return iBaseMapper.delete(id);
    }

    @Override
    public T select(Serializable id) {
        return (T) iBaseMapper.select(id);
    }


}
